package com.ffcs.web.model.entity;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * User entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "wechat_user")
public class WxUser implements java.io.Serializable {

	// Fields

	private Integer id;
	private String openid;
	private String nickname;
	private Short sex;
	private String language;
	private String city;
	private String province;
	private String country;
	private String headimgurl;
	private String privilege;
	private String telephone;
	private Short isConsume;
	private Double consumeTotal;
	private Integer consumeCounts;
	private Date registerTime;
	private Short status;
	private Date lastLoginTime;

	// Constructors

	/** default constructor */
	public WxUser() {
	}

	/** minimal constructor */
	public WxUser(String openid, String nickname) {
		this.openid = openid;
		this.nickname = nickname;
	}

	/** full constructor */
	public WxUser(String openid, String nickname, Short sex, String language,
			String city, String province, String country, String headimgurl,
			String privilege, String telephone, Short isConsume,
			Double consumeTotal, Integer consumeCounts, Date registerTime,
			Short status) {
		this.openid = openid;
		this.nickname = nickname;
		this.sex = sex;
		this.language = language;
		this.city = city;
		this.province = province;
		this.country = country;
		this.headimgurl = headimgurl;
		this.privilege = privilege;
		this.telephone = telephone;
		this.isConsume = isConsume;
		this.consumeTotal = consumeTotal;
		this.consumeCounts = consumeCounts;
		this.registerTime = registerTime;
		this.status = status;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "openid", nullable = false, length = 100)
	public String getOpenid() {
		return this.openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	@Column(name = "nickname", nullable = false, length = 50)
	public String getNickname() {
		return this.nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	@Column(name = "sex")
	public Short getSex() {
		return this.sex;
	}

	public void setSex(Short sex) {
		this.sex = sex;
	}

	@Column(name = "language", length = 50)
	public String getLanguage() {
		return this.language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}

	@Column(name = "city", length = 50)
	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	@Column(name = "province", length = 50)
	public String getProvince() {
		return this.province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	@Column(name = "country", length = 50)
	public String getCountry() {
		return this.country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	@Column(name = "headimgurl", length = 200)
	public String getHeadimgurl() {
		return this.headimgurl;
	}

	public void setHeadimgurl(String headimgurl) {
		this.headimgurl = headimgurl;
	}

	@Column(name = "privilege", length = 200)
	public String getPrivilege() {
		return this.privilege;
	}

	public void setPrivilege(String privilege) {
		this.privilege = privilege;
	}

	@Column(name = "telephone", length = 14)
	public String getTelephone() {
		return this.telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	@Column(name = "isConsume")
	public Short getIsConsume() {
		return this.isConsume;
	}

	public void setIsConsume(Short isConsume) {
		this.isConsume = isConsume;
	}

	@Column(name = "consumeTotal", precision = 15)
	public Double getConsumeTotal() {
		return this.consumeTotal;
	}

	public void setConsumeTotal(Double consumeTotal) {
		this.consumeTotal = consumeTotal;
	}

	@Column(name = "consumeCounts")
	public Integer getConsumeCounts() {
		return this.consumeCounts;
	}

	public void setConsumeCounts(Integer consumeCounts) {
		this.consumeCounts = consumeCounts;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "registerTime", length = 19)
	public Date getRegisterTime() {
		return this.registerTime;
	}

	public void setRegisterTime(Date registerTime) {
		this.registerTime = registerTime;
	}

	@Column(name = "status")
	public Short getStatus() {
		return this.status;
	}

	public void setStatus(Short status) {
		this.status = status;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "lastLoginTime", length = 19)
	public Date getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

}